<%
'注册插件
Call RegisterPlugin("StranJF","ActivePlugin_StranJF")
Function ActivePlugin_StranJF()
	Call Add_Filter_Plugin("Filter_Plugin_TArticleList_Build_Template","StranJF_InnerCode_Footer")
	Call Add_Filter_Plugin("Filter_Plugin_TArticle_Build_Template","StranJF_InnerCode_Footer")
	Call Add_Response_Plugin("Response_Plugin_Admin_Footer","<a id=""StranLink"" style=""display:none;""></a><script type=""text/javascript"" src=""" & ZC_BLOG_HOST & "zb_users/PLUGIN/StranJF/Std_StranJF.js""></script>")
End Function

Function StranJF_InnerCode_Footer(ByRef html)
	Call StranJF_InnerCode(html)
End Function

Function StranJF_InnerCode(ByRef Ftemplate)
	If IsEmpty(Ftemplate) Then Exit Function
	Dim innerHtml : innerHtml = "<script type=""text/javascript"" src=""" & ZC_BLOG_HOST & "zb_users/PLUGIN/StranJF/Std_StranJF.js""></script>" & vbCrLf
	Dim objRegExp
	Set objRegExp = new RegExp
	objRegExp.IgnoreCase = True
	objRegExp.Global = False
	objRegExp.Pattern = "(</body>)"
	Ftemplate = objRegExp.Replace(Ftemplate,innerHtml&"$1")
	Set objRegExp = Nothing
End Function

'从导航栏删除
Function StranJF_Del_Navbar
	Call GetFunction()
	Dim tmpstr:tmpstr = Functions(FunctionMetas.GetValue("navbar")).Content
	Functions(FunctionMetas.GetValue("navbar")).Content=Replace(tmpstr,"<li><a id=""StranLink"">繁體</a></li>","")
	Functions(FunctionMetas.GetValue("navbar")).Save
	Call ClearGlobeCache
	Call LoadGlobeCache
End Function

'添加到导航栏
Function StranJF_Add_Navbar
	Call GetFunction()
	Dim tmpstr:tmpstr = Functions(FunctionMetas.GetValue("navbar")).Content
	If InStr(tmpstr,"繁体")=0 or InStr(tmpstr,"StranLink")=0 Then
		Functions(FunctionMetas.GetValue("navbar")).Content = tmpstr & "<li><a id=""StranLink"">繁體</a></li>"
		Functions(FunctionMetas.GetValue("navbar")).Save
	End If
	Call ClearGlobeCache
	Call LoadGlobeCache
End Function

'安装插件
Function InstallPlugin_StranJF
	Call StranJF_Add_Navbar
	Call SetBlogHint(Empty,Empty,True)
End Function

'卸载插件
Function UnInstallPlugin_StranJF
	Call StranJF_Del_Navbar()
	Call SetBlogHint(Empty,Empty,True)
End Function
%>